# -*- coding: utf-8 -*-
from django.db import models

class News(models.Model):
	title = models.CharField(max_length=255, verbose_name='Tytuł')
	text = models.TextField(verbose_name='Treść')
	date = models.DateTimeField(verbose_name='Data dodania')
	class Meta:
		verbose_name = "Wiadomość"
		verbose_name_plural = "Wiadomości"
	class Admin:
		list_display = ('title', 'date')
		list_filter = ['date']
		search_fields = ['title', 'text']
		date_hierarchy = 'date'
	def __unicode__(self):
		return self.title
